import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './routes'
import store from '@/store'


Vue.use(VueRouter)



const router = new VueRouter({
    routes
})

router.beforeEach((to, from, next) => {
    const { isHeaderRightShow, title } = to.meta
    store.commit("headerRightShowAndTitle", { isHeaderRightShow, title })
    next()
})

export default router